<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>

<blockquote class="layui-elem-quote"><{$action}> </blockquote>

<form class="layui-form layui-form-pane" method="post" enctype="multipart/form-data" action="/tiku/save_import">
    <input type="hidden" name="id" value="<{$info['id']|default:"0"}>" />

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">请选择题目文档 <a href="/static/uploads/template.rar" style="color:red;">下载题库模板</a></label>
        <div class="layui-input-block" style="margin-top: 5px;">
            <div id="uploader2" class="upload_box" style="float:left; width:420px;">
                <div class="queueList">
                    <div id="dndArea2" class="placeholder dndArea">
                        <div id="filePicker2" class="filePicker"></div>
                        <p>或将文件拖到这里</p>
                    </div>
                </div>
                <div class="statusBar" style="display:none;">
                    <div class="progress">
                        <span class="text">0%</span>
                        <span class="percentage"></span>
                    </div><div class="info"></div>
                    <div class="btns">
                        <div id="filePickerBut2" class="filePickerBut"></div><div class="uploadBtn">开始上传</div>
                    </div>
                </div>
                <div class="upload_img_input" input_name='ad_image_url'></div>
            </div>
            <{if isset($info['ad_image_url']) AND $info['ad_image_url'] != ''}>
                <div class="layui-inline" style="float:left;"><img src="<{$info['ad_image_url']}>" style="max-height:175px;"/></div>
            <{/if}>
        </div>
    </div>

    <table class="layui-table" lay-even lay-skin="row" id="excel_import">
        <thead>
             <tr>
                <th>序号</th>
                <th>题干</th>
                <th>题目来源</th>
                <th>题型</th>
                <th>难度类型</th>
            </tr>
        </thead>
        <tbody>
        <!-- <{foreach from=$item_list item=item}>
            <tr>
                <td class="center"><{$item['title']}></td>
                <td class="center"><{$item['author']}></td>
                <td class="center"><{if $item['status'] == 1}>是<{else}>否<{/if}></td>
                <td class="center"><{$item['add_time']|date_format:'%Y-%m-%d %H:%M:%S'}></td>
            </tr>
        <{/foreach}>
        <{if $item_list|count eq 0}>
            <tr>
                <td class="center" style=" height:120px; text-align:center;line-height:120px;" colspan="8">
                    赞无数据！
                </td>
            </tr>
        <{/if}> -->
        
        </tbody>
    </table>
</form>


<{include file="public_html/footer.html"}>
<!-- <script type="text/javascript">
    layui.use(['form','jquery'], function(){
        var form = layui.form(),$ = layui.jquery;
        

        form.on('select(q_type)', function(data){
            var type = $(data.elem).val();
            if(type == 1){
                $("#an_checkbox_box, #an_choice_box").hide();
                $("#an_radio_box").show();
            }else if(type == 2){
                $("#an_radio_box, #an_choice_box").hide();
                $("#an_checkbox_box").show();
            }else if(type == 3){
                $("#an_radio_box, #an_checkbox_box").hide();
                $("#an_choice_box").show();
            }
            
        });
        
        form.on('select(subject)', function(data){
            var ii = layer.load();
            var subject_id = $(data.elem).val();
            $("#chapter_id").html('<option value="0">请选择章节</option>');  
            form.render('select');
            $.ajax({
                type: "POST",
                url: "/topic/ignore_get_subject_chapter",
                dataType:"json",
                data:{subject_id:subject_id},
                success: function(result){
                    layer.close(ii);
                    if(result.code == 1){
                        var html ='';
                        $.each(result.chapter_list, function(i, obj) {
                            if(obj.sub){
                                html += '<optgroup label="'+ obj.title+'">';
                                $.each(obj.sub, function(j, obj1) {
                                    html += '<option value="'+obj1.id+'">'+obj1.title+'</option>';
                                });
                                html += '</optgroup>'
                            }
                        });
                        $("#chapter_id").append(html);
                        form.render('select');
                    }
                }
            });
        });
    });
</script> -->